#include "list.h"
#include <stdlib.h>


list createList(void) {
	list l;

	l = (list)malloc(sizeof(struct _LINKED_LIST));
	if(l == NULL) {
		return NULL;
	} else {
		l->size = 0;
		l->head = NULL;

		return l;
	}
}

int insertNode(list l, char *string) {
	node n;
	node new_node;

	n = l->head;

	while(n->next != NULL) {
		n = n->next;
	}

	new_node = (node)malloc(sizeof(struct _NODE));

	if(new_node == NULL) {
		return 0;
	} else {
		new_node->string = string;
		new_node->next = NULL;

		n->next = new_node;

		return 1;
	}
}
